<?php

namespace App\Admin\Validate\Manger;

use App\Admin\Validate\BaseValidate;

/**
 * 权限组验证器
 */
class Manger extends BaseValidate
{
    //验证规则
    protected $rule = [
        'cpid' => 'required',
        'username' => 'required|string|min:2|max:20',
        'mobile' => ['required', 'regex:/^1[3-9]\d{9}$/'],
        // 'cpd_user_id'=>'required'
    ];
    //自定义验证信息
    protected $message = [
        'cpid.required' => '账套信息未选择',
        'username.required' => '用户名称不能为空',
        'username.min' => '用户名长度不能小于2位',
        'username.max' => '用户名长度不能大于20位',
        'mobile.required' => '用户手机号',
        'mobile.regex'=>'手机号不规范',
        'cpd_user_id.required' => '钉钉人员未选择',
    ];
}
